package cn.cubix.flow.security;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Getter
@Setter
@Configuration
@ConfigurationProperties(prefix = "security")
public class SecurityProperties {
    /** JWT token 的 Header Name */
    private String tokenHeader = "Authorization";
    /** JWT token 的 Header 文本前缀 */
    private String tokenPrefix = "Bearer ";
    /** JWT token 的 签名私钥 */
    private String tokenSecret = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
    /** JWT token 的 过期时间（毫秒） */
    private long tokenExpire = 60 * 60 * 1000;
    /** JWT token 是否加密 */
    private boolean tokenEncrypt = false;
}
